/***************************************************************************
 *   Copyright (C) 2009 by Eduardo Gurgel Pinho                            *
 *   edgurgel@gmail.com                                                    *
 *                                                                         *
 *   This program is free software; you can redistribute it and/or modify  *
 *   it under the terms of the GNU General Public License as published by  *
 *   the Free Software Foundation; either version 3 of the License, or     *
 *   (at your option) any later version.                                   *
 *                                                                         *
 *   This program is distributed in the hope that it will be useful,       *
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
 *   GNU General Public License for more details.                          *
 *                                                                         *
 *   You should have received a copy of the GNU General Public License     *
 *   along with this program; if not, write to the                         *
 *   Free Software Foundation, Inc.,                                       *
 *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
***************************************************************************/

#include "vector.h"

#include <iostream>
#include <cmath>

namespace Tut {

Vector::Vector(void) : x(0.0), y(0.0) , z(0.0), id(-1)
{ }

Vector::Vector(const double _x, const double _y,const double _z, const int _id) : x(_x), y(_y), z(_z), id(_id)
{ }

/*Vector::Vector(const double _x, const double _y) : x(_x), y(_y), z(0.0) 
{ }*/

Vector::Vector(const Vector& _vector) : x(_vector.x) , y(_vector.y) , z(_vector.z), id(_vector.id) { }

Vector::~Vector(void) { }

void Vector::set(const double _x,const double _y,const double _z) { 
	x = _x;
	y = _y;
	z = _z;
}

void Vector::show(void) const { std::cout << "(" << x << "," << y << "," << z << ")" << std::endl; } 

Vector& Vector::operator=(const Vector& _vector) {
	if(this != &_vector) {
		x = _vector.x;
		y = _vector.y;
		z = _vector.z;
		id = _vector.id;
	}
	return *this;
}


}
